<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动画</title>
    <link rel="stylesheet" href="public.css">
    <style>
        #box1:hover {
            animation: myfirstAnimation 10s 5;
            
        }
        @keyframes myfirstAnimation{
            
            10% {
                background-color: palegoldenrod;
                transform: translate(150px,150px);
            }
            30% {
                background-color: palegreen;
                transform: translate(270px,100px);
            }
            50% {
                background-color: paleturquoise;
                transform: translate(400px,0px);
            }
            50% {
                background-color: peru;
                transform: translate(520px,300px);
            }
            70% {
                background-color: pink;
                transform: translate(400px,100px);
            }
            90% {
                background-color: powderblue;
                transform: translate(170px,100px);
            }
            100% {
                background-color: palevioletred;
                
            }
        }

        .card {
            margin: 5px;
            width: 200px;
            height: 300px;
            border: solid 5px #666666;
            border-radius: 3px;
            box-shadow: 0 0 5px #888888;
            box-sizing: border-box;
            transition: border-radius 5s;

        }
        .card:hover {
            border-radius: 50%;
            border-bottom: solid 5px skyblue;
            animation: card1 5s 5;
        }
        @keyframes card1 {
            0% {
                border-bottom: solid 5px skyblue;
            }
            25% {
                border-right: solid 5px skyblue;
                background-color: palegreen;
            }
            75% {
                border-top: solid 5px skyblue;
                background-color: palegoldenrod;
            }
            100% {
                border-left: solid 5px skyblue;
                background-color: plum;
            }
        }

    </style>
</head>
<body>
    <p>animation: name duration timing-function delay iteration-count direction fill-mode play-state;</p>
    <div>
        <div class="box" id="box1">1</div>
    </div>
    <div class="card all-center">1</div>
</body>
</html>